package com.qf.collection.iterator;

import java.util.ArrayList;

/**
 * 测试返回10个随机字符串的迭代器
 */
public class Demo01 {
    public static void main(String[] args) {

        RandomStrIterator randomStrIterator = new RandomStrIterator(5);
//        while (randomStrIterator.hasNext()){
//            Object next = randomStrIterator.next();
//            System.out.println(next);
//        }

        for (Object o : randomStrIterator) {
            System.out.println(o);
        }

    }
}
